package com.tech.service.impl;

import com.tech.service.*;

/**
 * 提供Service实现类的工厂类
 */
public class ServiceImplFactory {
	private static AddressService addressService;
	private static AdminService adminService;
	private static CarService carService;
	private static GoodsImageService goodsImageService;
	private static GoodsService goodsService;
	private static GoodsSortService goodsSortService;
	private static MessageService messageService;
	private static OrderService orderService;
	private static PortService portService;
	private static ShortMessageService shortMessageService;
	private static UserService userService;

	public static AddressService getAddressService() {
		if (addressService == null) addressService = new AddressServiceImpl();
		return addressService;
	}

	public static AdminService getAdminService() {
		if (addressService == null) addressService = new AddressServiceImpl();
		return adminService;
	}

	public static CarService getCarService() {
		if (carService == null) carService = new CarServiceImpl();
		return carService;
	}

	public static GoodsImageService getGoodsImageService() {
		if (goodsImageService == null) goodsImageService = new GoodsImageServiceImpl();
		return goodsImageService;
	}

	public static GoodsService getGoodsService() {
		if (goodsService == null) goodsService = new GoodsServiceImpl();
		return goodsService;
	}

	public static GoodsSortService getGoodsSortService() {
		if (goodsSortService == null) goodsSortService = new GoodsSortServiceImpl();
		return goodsSortService;
	}

	public static MessageService getMessageService() {
		if (messageService == null) messageService = new MessageServiceImpl();
		return messageService;
	}

	public static OrderService getOrderService() {
		if (orderService == null) orderService = new OrderServiceImpl();
		return orderService;
	}

	public static PortService getPortService() {
		if (portService == null) portService = new PortServiceImpl();
		return portService;
	}

	public static ShortMessageService getShortMessageService() {
		if (shortMessageService == null) shortMessageService = new ShortMessageServiceImpl();
		return shortMessageService;
	}

	public static UserService getUserService() {
		if (userService == null) userService = new UserServiceImpl();
		return userService;
	}
}
